// pages/find_info/index.js
var t=getApp(),
e = t.requirejs("api/index"),
core= t.requirejs("core");
Page({
  data: {
    route: "find_info",
    menu: t.tabBar,
    menu_show:false,
    show: false
  },
  //底部导航跳转
  menu_url: function (k) {
    core.menu_url(k, 2);
  },
  onLoad: function (options) {
    if (options != null && options != undefined) {
      this.setData({
        tabbar_index: options.tabbar_index ? options.tabbar_index : -1
      });
    }
    core.setting();
    this.setData({
      menu: getApp().tabBar
    })
    var key=t.isInArray(getApp().tabBar.list,this.data.route);
    if(key){
      this.setData({
        menu_show:true 
      })
     
    }

    if (this.data.tabbar_index >= 0) {
      this.setData({
        showtabbar: true,
      })
    }

     var a = this;
      a.setData({
          id : options.id
      })
      
  },
  onShow:function(){
    var a = this,
      ident = '',
      id = a.data.id;
    //案列详情
    e.ArticleInfo(ident, id, a, function (t) {
      a.setData(t)
    })
  },
  /**
* 下拉刷新
*/
  onPullDownRefresh: function () {
    this.onShow();
    wx.stopPullDownRefresh();
  },
  //分享
  onShareAppMessage: function () {

    var title = this.data.detail.title;
    var path = '/yb_shop/pages/find_info/index?id=' + this.data.detail.article_id;
    return {
      title: title,
      path: path
    }
  },
})